#!/usr/bin/env python

#   Trolls Outta Luckland v0.0.7
#   Copyright 2009-2010, Gummbum
#
#   This file is part of Trolls Outta Luckland.
#
#   Trolls Outta Luckland is free software: you can redistribute it
#   and/or modify it under the terms of the GNU General Public License
#   as published by the Free Software Foundation, either version 3 of
#   the License, or (at your option) any later version.
#
#   Trolls Outta Luckland is distributed in the hope that it will be
#   useful, but WITHOUT ANY WARRANTY; without even the implied warranty
#   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with Trolls Outta Luckland.  If not, see
#   <http://www.gnu.org/licenses/>.

__version__ = '0.0.7'

"""
After unpacking the game files run this script.
"""

import compileall
import os
from os.path import join as join_path, dirname, realpath, abspath
import sys

PROGRAM_DIR = dirname(realpath(abspath(__file__)))
os.chdir(PROGRAM_DIR)

## Compile all the modules in ./lib/
print 'Compiling modules in', os.path.join(PROGRAM_DIR, 'lib'), '...'
sys.stdout.flush()
if compileall.compile_dir('lib', maxlevels=1, force=True):
    print 'Setup is complete.'
else:
    print 'Setup had errors.'
